// import config from "@/config/config.js";

/**
 * 获取默认语言或设置的语言key
 */
export const getDefaultLocale = () => {
	var current_locale = localStorage.getItem("lang") || "cn";
	let locale = "cn";
	switch (current_locale) {
		case "cn":
			locale = "cn";
			break;
		case "us":
			locale = "us";
			break;
		case "nl":
			locale = "nl";
			break;
			// case "tw":
			// case "sg":
			// case "mo":
			//   locale = "ft";
			//   break;
			// case "ko":
			// case "kr":
			//   locale = "ko";
			//   break;
			// case "ja":
			// case "jp":
			//   locale = "jp";
			//   break;
			// default:
			//   locale = "en";
			//   break;
	}

	// let storage_locale;
	// if (process.env.VUE_APP_PLATFORM === "h5") {
	//   storage_locale = uni.getStorageSync(config.langStorageKey);
	// } else {
	//   storage_locale = plus.storage.getItem(config.langStorageKey);
	// }

	return current_locale || locale;
};